<?php

namespace App\Policies;

use App\Task;
use App\User;

class TaskPolicy
{

    /**
     * Determine if the given user can delete the given task.
     *
     * @param User $user
     * @param Task $task
     * @return bool
     */
    public function destory(User $user, Task $task)
    {
        return $user->id === $task->user_id;
    }
}
